package com.j180.controller;

import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("/user")
public class UserController {

    @PostMapping("/login")
    public String login(String username, String pwd, HttpSession session){
        System.out.println(username+"   "+pwd);
        if("abc".equals(username)&& "123".equals("123")){

            session.setAttribute("user","ok");

            return "ok";
        }
        return "no";
    }
}
